environment:
matrix:
- # MinGW gui builds fail with Qt newer than 5.6 as webkit and webengine are missing.
- # MinGW
- # - name: win32
- # platform: mingw
- # qt: 5.5\mingw492_32
- # tools: mingw492_32
- # MinGW
- # - name: win32
- # platform: mingw
- # qt: 5.6\mingw49_32
- # tools: mingw492_32
- # do a build with the minimum level of Qt we support.
- # appveyor dropped Qt 5.7 with msvc2015.
- # MSVC x32
- # - name: win32
- # platform: x86
- # qt: 5.7\msvc2015
- # MSVC x32
- - name: win32
- platform: x86
+ - arch: x86
qt: 5.9\msvc2015
- # MSVC x64
- - name: win64
- platform: amd64
+ flow: nmake
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ - arch: amd64
qt: 5.9\msvc2015_64
+ flow: nmake
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ - arch: x86_amd64
+ qt: 5.9\msvc2017_64
+ flow: nmake
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ - arch: x86_amd64
+ qt: 5.9\msvc2017_64
+ flow: msbuild
+ APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
init:
- - if %platform%==mingw set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- - if %platform%==mingw set PATH=C:\Qt\Tools\%tools%\bin;%PATH%
- set PATH=C:\Qt\%qt%\bin;%PATH%
- - if not %platform%==mingw call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform%
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch%
+ - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch%
build_script:
- ps: |
# be aware that vcvarsall will reset platform amd64 to X64!
- echo "platform: $env:platform"
+ echo "arch: $env:arch"
echo "qt: $env:qt"
qmake -query
Get-Location
- if (($env:platform -eq "mingw") -and ($env:qt -eq "5.5\mingw492_32"))
- {
- # windeployqt in 5.5.1 suffers from bug
- # https://bugreports.qt.io/browser/QTBUG-48946
- # which trashes the translations. Work around
- # by using the next version of windeployqt which had this
- # bug fixed.
- & ".\tools\make_windows_release.ps1" -windeployqt "C:\Qt\5.6\mingw49_32\bin\windeployqt.exe"
- $verid=(Get-Date -UFormat "%Y%m%dT%H%MZ" -Date (Get-Date -Date (git show -s --format="%aI" HEAD)).toUniversalTime()) `
- + '-' + (git rev-parse --short=7 HEAD)
- Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Setup.exe" }
- Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Manifest.txt" }
- }
- elseif (($env:platform -eq "x86") -and ($env:qt -eq "5.9\msvc2015"))
+ if (($env:arch -eq "x86") -and ($env:qt -eq "5.9\msvc2015"))
{
# full build and deploy of our release configuration
- & ".\tools\make_windows_release.ps1" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_9_MSVC2015_32bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_9_MSVC2015_32bit-Release" -mkspec win32-msvc -mkcmd nmake.exe
+ & ".\tools\make_windows_release.ps1" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_9_MSVC2015_32bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_9_MSVC2015_32bit-Release" -flow $env:flow -buildinstaller "true"
$verid=(Get-Date -UFormat "%Y%m%dT%H%MZ" -Date (Get-Date -Date (git show -s --format="%aI" HEAD)).toUniversalTime()) `
+ '-' + (git rev-parse --short=7 HEAD)
Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Setup.exe" }
Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabel-$($verid)-Manifest.txt" }
}
- elseif ($env:platform -eq "mingw")
- {
- qmake GPSBabel.pro
- mingw32-make
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- }
else
{
- qmake GPSBabel.pro
- nmake
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
+ & ".\tools\make_windows_release.ps1" -flow $env:flow
}
# work around issue with standard error output causing a build failure by making sure last command succeeds.
# see https://help.appveyor.com/discussions/problems/10014-false-build-fail-status
- ps: |
$env:projdir=(C:\msys64\usr\bin\bash.exe -c "pwd")
C:\msys64\usr\bin\bash.exe -lc "cd $env:projdir; ./tools/ci_tokens"
- if (($env:platform -eq "x86") -and ($env:qt -eq "5.9\msvc2015") -and ($env:APPVEYOR_REPO_BRANCH -eq "master"))
+ if (($env:arch -eq "x86") -and ($env:qt -eq "5.9\msvc2015") -and ($env:APPVEYOR_REPO_BRANCH -eq "master"))
{
$verid=(Get-Date -UFormat "%Y%m%dT%H%MZ" -Date (Get-Date -Date (git show -s --format="%aI" HEAD)).toUniversalTime()) `
+ '-' + (git rev-parse --short=7 HEAD)
# Run this from a Qt Desktop command window that has the Qt and mingw compiler paths set up,\r
# such as the one Qt Creator will put on the start menu.\r
# For example, to run overriding the default locations of windeployqt and ISSC:\r
-# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -windeployqt "C:\Qt\5.6.3\mingw49_32\bin\windeployqt.exe" -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe"\r
+# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -windeployqt "C:\Qt\5.6.3\mingw49_32\bin\windeployqt.exe" -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" -flow mingw\r
# Or to do a 64 bit MSVC build with a newer Qt:\r
-# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_9_3_MSVC2015_64bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_9_3_MSVC2015_64bit-Release" -mkspec win32-msvc -mkcmd nmake.exe\r
+# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" -gpsbabel_build_dir_name "build-GPSBabel-Desktop_Qt_5_9_3_MSVC2015_64bit-Release" -gui_build_dir_name "build-app-Desktop_Qt_5_9_3_MSVC2015_64bit-Release"\r
#\r
# Be aware this script is used by appveyor.yml\r
# \r
Param(\r
$windeployqt = "windeployqt.exe",\r
$iscc = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe",\r
- $gpsbabel_build_dir_name = "build-GPSBabel-Desktop_Qt_5_5_1_MinGW_32bit-Release",\r
- $gui_build_dir_name = "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release",\r
- $mkspec = "win32-g++",\r
- $mkcmd = "mingw32-make"\r
+ $gpsbabel_build_dir_name = "build-GPSBabel-Desktop-Release",\r
+ $gui_build_dir_name = "build-app-Desktop-Release",\r
+ $flow = "nmake",\r
+ $buildinstaller = "false"\r
)\r
+$ErrorActionPreference = "Stop"\r
# verify we are in the top of the gpsbabel clone\r
-Get-Item tools/make_windows_release.ps1 -ErrorAction Stop\r
+Get-Item tools/make_windows_release.ps1 -ErrorAction Stop | Out-Null\r
$gpsbabel_src_dir = "$Pwd"\r
$gpsbabel_build_dir = "$($gpsbabel_src_dir)\..\$($gpsbabel_build_dir_name)"\r
$gui_build_dir = "$($gpsbabel_src_dir)\$($gui_build_dir_name)"\r
# mimic creator shadow build to match Inno setup file\r
# make sure we are staring with a clean build directory\r
Remove-Item "$($gpsbabel_build_dir)" -Recurse -ErrorAction Ignore\r
-New-Item "$($gpsbabel_build_dir)" -type directory -force\r
+New-Item "$($gpsbabel_build_dir)" -type directory -force | Out-Null\r
Set-Location "$($gpsbabel_build_dir)"\r
-qmake "$($gpsbabel_src_dir)\GPSBabel.pro" -spec "$($mkspec)"\r
-if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
-& "$($mkcmd)" qmake_all\r
-& "$($mkcmd)"\r
-if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+switch ($flow) {\r
+ "mingw" { qmake "$($gpsbabel_src_dir)\GPSBabel.pro" -spec "win32-g++" }\r
+ "msbuild" { qmake -tp vc "$($gpsbabel_src_dir)\GPSBabel.pro"}\r
+ "nmake" { qmake "$($gpsbabel_src_dir)\GPSBabel.pro" -spec "win32-msvc" }\r
+}\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+switch ($flow) {\r
+ "mingw" { ming32-make }\r
+ "msbuild" { msbuild GPSBabel.vcxproj -property:Configuration=Release }\r
+ "nmake" { nmake /NOLOGO }\r
+}\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
# copy GPSBabel.exe for use by test_script\r
Remove-Item "$($gpsbabel_src_dir)\release" -Recurse -ErrorAction Ignore\r
-New-Item "$($gpsbabel_src_dir)\release" -type directory -force\r
+New-Item "$($gpsbabel_src_dir)\release" -type directory -force | Out-Null\r
Copy-Item release\GPSBabel.exe "$($gpsbabel_src_dir)\release\GPSBabel.exe"\r
Set-Location "$($gpsbabel_src_dir)"\r
# make sure we are staring with a clean build directory\r
Remove-Item "$($gui_build_dir)" -Recurse -ErrorAction Ignore\r
-New-Item "$($gui_build_dir)" -type directory -force\r
+New-Item "$($gui_build_dir)" -type directory -force | Out-Null\r
Set-Location "$($gui_build_dir)"\r
-qmake "$($gpsbabel_src_dir)\gui\app.pro" -spec "$($mkspec)"\r
-if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
-& "$($mkcmd)" qmake_all\r
-& "$($mkcmd)"\r
-if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+switch ($flow) {\r
+ "mingw" { qmake "$($gpsbabel_src_dir)\gui\app.pro" -spec "win32-g++" }\r
+ "msbuild" { qmake -tp vc "$($gpsbabel_src_dir)\gui\app.pro"}\r
+ "nmake" { qmake "$($gpsbabel_src_dir)\gui\app.pro" -spec "win32-msvc" }\r
+}\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+switch ($flow) {\r
+ "mingw" { ming32-make }\r
+ "msbuild" { msbuild GPSBabelFE.vcxproj -property:Configuration=Release }\r
+ "nmake" { nmake /NOLOGO }\r
+}\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+# work around errors with lupdate, lrelease misprocessing qtHaveModule(webenginewidgets)\r
+# and generating a message to stderr WARNING: Project ERROR: Unknown module(s) in QT: webkit webkitwidgets\r
+# and, on Windows, setting $? to false.\r
+# (assuming they are not installed).\r
+$ErrorActionPreference = "Continue"\r
lupdate "$($gpsbabel_src_dir)\gui\app.pro"\r
lrelease "$($gpsbabel_src_dir)\gui\app.pro"\r
+$ErrorActionPreference = "Stop"\r
# use --plugindir option to locate the plugins.\r
& "$($windeployqt)" --verbose 10 --plugindir release\plugins release\GPSBabelFE.exe\r
-if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
-Set-Location "$($gpsbabel_src_dir)\gui"\r
-& "$($iscc)" /Dgpsbabel_build_dir_name="$($gpsbabel_build_dir_name)" /Dgui_build_dir_name="$($gui_build_dir_name)" setup.iss\r
-if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+if ($buildinstaller -eq "true")\r
+{\r
+ Set-Location "$($gpsbabel_src_dir)\gui"\r
+ & "$($iscc)" /Dgpsbabel_build_dir_name="$($gpsbabel_build_dir_name)" /Dgui_build_dir_name="$($gui_build_dir_name)" setup.iss\r
+ if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+}\r
Set-Location "$($gpsbabel_src_dir)"\r